<!DOCTYPE html>
<style>
#mask {
  width: 100px;
  height: 100px;
  -webkit-mask-box-image: url(../../fast/backgrounds/resources/dot.png) 3;
}
#content {
  width: 200px;
  height: 200px;
  background-color: green;
}
</style>
<div id="mask">
  <div id="content"></div>
</div>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
runAfterLayoutAndPaint(function() {
  mask.style.width = '200px';
}, true);
</script>
